def maximum_sequence_search(array):
    n=len(array)
    result=array[0]
    for i in range(1,n):
        if array[i] > result:
            result=array[i]
    return result

def maximum_divide_conquer_recursion(array):
    n=len(array)
    if n == 1:
        return array[0]
    if n == 2:
        if array[0] >= array[1]:
            return array[0]
        else:
            return array[1]
    mid=(n-1)//2
    return maximum_divide_conquer_recursion([maximum_divide_conquer_recursion(array[:mid+1]),
                                             maximum_divide_conquer_recursion(array[mid+1:])])

def maximum_divide_conquer_iteration(array):
    candidates=array
    n=len(candidates)
    while n > 1:
        for i in range(0,n,2):
            if i+1 < n:
                if candidates[i] > candidates[i+1]:
                    candidates[i+1]=candidates[i]
                else:
                    candidates[i]=candidates[i+1]
        candidates=[ candidates[i] for i in range(0,n,2) ]
        n=len(candidates)
    return candidates[0]
